﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using KPIS.GERP.GIMS.MODEL;
using KPIS.GERP.GIMS.DAL;
using KPIS.GERP.GIMS.DALFactory;
using KPIS.DBM;
namespace KPIS.GERP.GIMS.BLL
{
    public class BidderQuotationBLL
    {
        private static readonly BidderQuotationDAL dal = DataAccess.CreateBidderQuotation();

        public BidderQuotationBLL()
        {

        }

        public IList<BidderQuotationInfo> GetListBidderQuotation(int BidderSeq)
        {
            return dal.GetListBidderQuotation(BidderSeq);
        }

        public BidderQuotationInfo GetBidderQuotation(int BidderQuoSeq)
        {
            return dal.GetBidderQuotation(BidderQuoSeq);
        }

        public IList<BidderQuotationInfo> GetItemNameFromPurchaseRequest(int pr_seq)
        {
            return dal.GetItemNameFromPurchaseRequest(pr_seq);
        }

        public IList<BidderQuotationInfo> GetItemNameFromBid(int bid_seq)
        {
            return dal.GetItemNameFromBid(bid_seq);
        }

        public IList<BidderQuotationInfo> GetBidderQuotationFromPurchaseRequestItemWithPurchaseRequest(int pr_seq, int pr_item_seq)
        {
            return dal.GetBidderQuotationFromPurchaseRequestItemWithPurchaseRequest(pr_seq, pr_item_seq);
        }

        public IList<BidderQuotationInfo> GetBidderQuotationFromPurchaseRequestItemWithBid(int bid_seq, int pr_item_seq)
        {
            return dal.GetBidderQuotationFromPurchaseRequestItemWithBid(bid_seq, pr_item_seq);
        }

        public JudgementInfo GetJudgement(int PrSeq)
        {
            return dal.GetJudgement(PrSeq);
        }

        public JudgementInfo GetJudgementFromBid(int BidSeq)
        {
            return dal.GetJudgementFromBid(BidSeq);
        }

        public IList<BidderQuotationInfo> GetListJudgement(int PrSeq)
        {
            return dal.GetListJudgement(PrSeq);
        }

        public IList<BidderQuotationInfo> GetListJudgementFromBid(int BidSeq)
        {
            return dal.GetListJudgementFromBid(BidSeq);
        }

        public void Insert(int BidderSeq, IList<BidderQuotationInfo> infoListBidderQuotation, IDBManager dbManagerTrans)
        {
            dal.Insert(BidderSeq, infoListBidderQuotation, dbManagerTrans);
        }

        public void Insert(BidderQuotationInfo infoBidderQuotation)
        {
            dal.Insert(infoBidderQuotation);
        }

        public void InsertBid(BidderQuotationInfo infoBidderQuotation)
        {
            dal.InsertBid(infoBidderQuotation);
        }

        public void Update(BidderQuotationInfo infoBidderQuotation)
        {
            dal.Update(infoBidderQuotation);
        }

        public void DeleteFromDB(IList<BidderQuotationInfo> infoList)
        {
            dal.DeleteFromDB(infoList);
        }

        public void DeleteBidFromDB(IList<BidderQuotationInfo> infoList, int bidder_seq)
        {
            dal.DeleteBidFromDB(infoList, bidder_seq);
        }

        public IList<BidderQuotationInfo> GetBidderQuotationFromPurchaseRequestItem(int pr_seq, int vat_seq, Nullable<double> vat_percent, Nullable<int> bidder_seq)
        {
            return dal.GetBidderQuotationFromPurchaseRequestItem(pr_seq, vat_seq, vat_percent, bidder_seq);
        }

        public void InsertBidderQuotationFromBid(IList<PurchaseRequestItemInfo> infoList, int bidder_seq, int vat_seq, Nullable<double> vat_percent)
        {
            dal.InsertBidderQuotationFromBid(infoList, bidder_seq, vat_seq, vat_percent);
        }

        public void SelectedBidderQuotation(IList<BidderQuotationInfo> infoList)
        {
            dal.SelectedBidderQuotation(infoList);
        }
    }
}
